import java.lang.Throwable;
import java.lang.Math;

public class Test2 {
    public static void main(String[] args) {

        try {
            solve(1,0,1);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void solve(int a, int b, int c) throws Exception {
        if (a == 0 || b == 0 || c == 0) {
            throw new Equation();
        }

        double r1 = (-1 * b + Math.sqrt(b * b - 4 * a * c)) / 2 * a;
        double r2 = (-1 * b - Math.sqrt(b * b - 4 * a * c)) / 2 * a;

        System.out.println("r1 = " + r1);
        System.out.println("r2 = " + r2);
    }
}

class Equation extends Exception {
   public Equation() {
       System.out.println("输入错误");
   }
}